package com.shou.api.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 预定表，用于管理车位的预定情况
 * @TableName reservations
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ReservationDTO implements Serializable {
    /**
     * 预定ID，自增主键
     */
    private Integer id;

    /**
     * 预定用户的ID
     */
    private Integer userId;

    /**
     * 车位编号
     */
    private String spaceCode;

    /**
     * 创建时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
     * 预定状态，分为'PENDING'、 'CONFIRMED'、 'CANCELLED'
     */
    private String status;

    /**
     * 预定的起始时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;

    /**
     * 预定的结束时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;

    /**
     * 备注信息
     */
    private String remark;
}